package com.dr.cmdb.core.listener;

import com.dr.cmdb.common.log.LoggerUtil;
import com.dr.cmdb.core.listener.event.AuditLogSaveEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @ProjectName: cmdb
 * @Package: com.dr.cmdb.core.listener
 * @Description: java类作用描述
 * @Author: duanrui
 * @CreateDate: 2021/5/8 15:04
 * @Version: 1.0
 * <p>
 * Copyright: Copyright (c) 2021
 */
@Component
@Slf4j
public class AuditLogSaveListener {

    @EventListener
    @Async
    public void saveLog(AuditLogSaveEvent event) {
        LoggerUtil.info(log, "保存日志", event.getOperateLog());
    }
}
